//
//	ZcoModelUserData.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "ZcoModelUserData.h"

NSString *const kZcoModelUserDataCallMediaType = @"callMediaType";
NSString *const kZcoModelUserDataClientInfo = @"clientInfo";
NSString *const kZcoModelUserDataCustomer = @"customer";
NSString *const kZcoModelUserDataFilter = @"filter";
NSString *const kZcoModelUserDataFormId = @"formId";
NSString *const kZcoModelUserDataFullName = @"fullName";
NSString *const kZcoModelUserDataGender = @"gender";
NSString *const kZcoModelUserDataIsScreenSyncMode = @"isScreenSyncMode";
NSString *const kZcoModelUserDataName = @"name";
NSString *const kZcoModelUserDataReceiveMediaType = @"receiveMediaType";
NSString *const kZcoModelUserDataService = @"service";
NSString *const kZcoModelUserDataSpecifyAgent = @"specifyAgent";
NSString *const kZcoModelUserDataUa = @"ua";
NSString *const kZcoModelUserDataUserId = @"userId";

@interface ZcoModelUserData ()
@end
@implementation ZcoModelUserData




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kZcoModelUserDataCallMediaType] isKindOfClass:[NSNull class]]){
		self.callMediaType = dictionary[kZcoModelUserDataCallMediaType];
	}	
	if(![dictionary[kZcoModelUserDataClientInfo] isKindOfClass:[NSNull class]]){
		self.clientInfo = [[ZcoModelClientInfo alloc] initWithDictionary:dictionary[kZcoModelUserDataClientInfo]];
	}

	if(![dictionary[kZcoModelUserDataCustomer] isKindOfClass:[NSNull class]]){
		self.customer = [[ZcoModelCustomer alloc] initWithDictionary:dictionary[kZcoModelUserDataCustomer]];
	}

	if(![dictionary[kZcoModelUserDataFilter] isKindOfClass:[NSNull class]]){
		self.filter = dictionary[kZcoModelUserDataFilter];
	}	
	if(![dictionary[kZcoModelUserDataFormId] isKindOfClass:[NSNull class]]){
		self.formId = dictionary[kZcoModelUserDataFormId];
	}	
	if(![dictionary[kZcoModelUserDataFullName] isKindOfClass:[NSNull class]]){
		self.fullName = dictionary[kZcoModelUserDataFullName];
	}	
	if(![dictionary[kZcoModelUserDataGender] isKindOfClass:[NSNull class]]){
		self.gender = dictionary[kZcoModelUserDataGender];
	}	
	if(![dictionary[kZcoModelUserDataIsScreenSyncMode] isKindOfClass:[NSNull class]]){
		self.isScreenSyncMode = [dictionary[kZcoModelUserDataIsScreenSyncMode] boolValue];
	}

	if(![dictionary[kZcoModelUserDataName] isKindOfClass:[NSNull class]]){
		self.name = dictionary[kZcoModelUserDataName];
	}	
	if(![dictionary[kZcoModelUserDataReceiveMediaType] isKindOfClass:[NSNull class]]){
		self.receiveMediaType = dictionary[kZcoModelUserDataReceiveMediaType];
	}	
	if(![dictionary[kZcoModelUserDataService] isKindOfClass:[NSNull class]]){
		self.service = dictionary[kZcoModelUserDataService];
	}	
	if(![dictionary[kZcoModelUserDataSpecifyAgent] isKindOfClass:[NSNull class]]){
		self.specifyAgent = dictionary[kZcoModelUserDataSpecifyAgent];
	}	
	if(![dictionary[kZcoModelUserDataUa] isKindOfClass:[NSNull class]]){
		self.ua = [[ZcoModelUa alloc] initWithDictionary:dictionary[kZcoModelUserDataUa]];
	}

	if(![dictionary[kZcoModelUserDataUserId] isKindOfClass:[NSNull class]]){
		self.userId = dictionary[kZcoModelUserDataUserId];
	}	
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	if(self.callMediaType != nil){
		dictionary[kZcoModelUserDataCallMediaType] = self.callMediaType;
	}
	if(self.clientInfo != nil){
		dictionary[kZcoModelUserDataClientInfo] = [self.clientInfo toDictionary];
	}
	if(self.customer != nil){
		dictionary[kZcoModelUserDataCustomer] = [self.customer toDictionary];
	}
	if(self.filter != nil){
		dictionary[kZcoModelUserDataFilter] = self.filter;
	}
	if(self.formId != nil){
		dictionary[kZcoModelUserDataFormId] = self.formId;
	}
	if(self.fullName != nil){
		dictionary[kZcoModelUserDataFullName] = self.fullName;
	}
	if(self.gender != nil){
		dictionary[kZcoModelUserDataGender] = self.gender;
	}
	dictionary[kZcoModelUserDataIsScreenSyncMode] = @(self.isScreenSyncMode);
	if(self.name != nil){
		dictionary[kZcoModelUserDataName] = self.name;
	}
	if(self.receiveMediaType != nil){
		dictionary[kZcoModelUserDataReceiveMediaType] = self.receiveMediaType;
	}
	if(self.service != nil){
		dictionary[kZcoModelUserDataService] = self.service;
	}
	if(self.specifyAgent != nil){
		dictionary[kZcoModelUserDataSpecifyAgent] = self.specifyAgent;
	}
	if(self.ua != nil){
		dictionary[kZcoModelUserDataUa] = [self.ua toDictionary];
	}
	if(self.userId != nil){
		dictionary[kZcoModelUserDataUserId] = self.userId;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	if(self.callMediaType != nil){
		[aCoder encodeObject:self.callMediaType forKey:kZcoModelUserDataCallMediaType];
	}
	if(self.clientInfo != nil){
		[aCoder encodeObject:self.clientInfo forKey:kZcoModelUserDataClientInfo];
	}
	if(self.customer != nil){
		[aCoder encodeObject:self.customer forKey:kZcoModelUserDataCustomer];
	}
	if(self.filter != nil){
		[aCoder encodeObject:self.filter forKey:kZcoModelUserDataFilter];
	}
	if(self.formId != nil){
		[aCoder encodeObject:self.formId forKey:kZcoModelUserDataFormId];
	}
	if(self.fullName != nil){
		[aCoder encodeObject:self.fullName forKey:kZcoModelUserDataFullName];
	}
	if(self.gender != nil){
		[aCoder encodeObject:self.gender forKey:kZcoModelUserDataGender];
	}
	[aCoder encodeObject:@(self.isScreenSyncMode) forKey:kZcoModelUserDataIsScreenSyncMode];	if(self.name != nil){
		[aCoder encodeObject:self.name forKey:kZcoModelUserDataName];
	}
	if(self.receiveMediaType != nil){
		[aCoder encodeObject:self.receiveMediaType forKey:kZcoModelUserDataReceiveMediaType];
	}
	if(self.service != nil){
		[aCoder encodeObject:self.service forKey:kZcoModelUserDataService];
	}
	if(self.specifyAgent != nil){
		[aCoder encodeObject:self.specifyAgent forKey:kZcoModelUserDataSpecifyAgent];
	}
	if(self.ua != nil){
		[aCoder encodeObject:self.ua forKey:kZcoModelUserDataUa];
	}
	if(self.userId != nil){
		[aCoder encodeObject:self.userId forKey:kZcoModelUserDataUserId];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.callMediaType = [aDecoder decodeObjectForKey:kZcoModelUserDataCallMediaType];
	self.clientInfo = [aDecoder decodeObjectForKey:kZcoModelUserDataClientInfo];
	self.customer = [aDecoder decodeObjectForKey:kZcoModelUserDataCustomer];
	self.filter = [aDecoder decodeObjectForKey:kZcoModelUserDataFilter];
	self.formId = [aDecoder decodeObjectForKey:kZcoModelUserDataFormId];
	self.fullName = [aDecoder decodeObjectForKey:kZcoModelUserDataFullName];
	self.gender = [aDecoder decodeObjectForKey:kZcoModelUserDataGender];
	self.isScreenSyncMode = [[aDecoder decodeObjectForKey:kZcoModelUserDataIsScreenSyncMode] boolValue];
	self.name = [aDecoder decodeObjectForKey:kZcoModelUserDataName];
	self.receiveMediaType = [aDecoder decodeObjectForKey:kZcoModelUserDataReceiveMediaType];
	self.service = [aDecoder decodeObjectForKey:kZcoModelUserDataService];
	self.specifyAgent = [aDecoder decodeObjectForKey:kZcoModelUserDataSpecifyAgent];
	self.ua = [aDecoder decodeObjectForKey:kZcoModelUserDataUa];
	self.userId = [aDecoder decodeObjectForKey:kZcoModelUserDataUserId];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	ZcoModelUserData *copy = [ZcoModelUserData new];

	copy.callMediaType = [self.callMediaType copy];
	copy.clientInfo = [self.clientInfo copy];
	copy.customer = [self.customer copy];
	copy.filter = [self.filter copy];
	copy.formId = [self.formId copy];
	copy.fullName = [self.fullName copy];
	copy.gender = [self.gender copy];
	copy.isScreenSyncMode = self.isScreenSyncMode;
	copy.name = [self.name copy];
	copy.receiveMediaType = [self.receiveMediaType copy];
	copy.service = [self.service copy];
	copy.specifyAgent = [self.specifyAgent copy];
	copy.ua = [self.ua copy];
	copy.userId = [self.userId copy];

	return copy;
}
@end